package com.boardour.toupin;

import android.content.Intent;
import android.view.View;

import com.boardour.base.ui.AppActivity;
import com.boardour.base.ui.titlebar.DefTitleBar;
import com.boardour.toupin.push.PushActivity;
import com.boardour.toupin.show.ShowActivity;
import com.boardour.wifip2p.WifiP2pCommon;

public class MainActivity extends AppActivity {
    @Override
    protected void initTitle(DefTitleBar titleBar) {
        titleBar.setTitle("安博斯投屏");
    }

    @Override
    public int getContentLayout() {
        return R.layout.activity_main;
    }


    public void push(View view) {
        startActivity(new Intent(this, PushActivity.class));
    }

    public void show(View view) {
        startActivity(new Intent(this, ShowActivity.class));
    }

    public void finish(View view) {
        finish();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        WifiP2pCommon.getInstance().removeGroup();
    }

    public void login(View view) {
        startActivity(new Intent(this, LoginActivity.class));
    }
}